package com.swx.identityservice.dtos.permission;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel("输出权限Dto")
public class PermissionListOutputDto {
    @ApiModelProperty("权限集合")
    private List<PermissionOutputDto> depts;
    @ApiModelProperty("权限总数")
    private long total;

    public void addUser(PermissionOutputDto  permissionOutputDto) {
        if (depts == null)  depts = new ArrayList<>();
        this.depts.add(permissionOutputDto);
    }
}
